A motion estimation operation for a moving image is performed before a motion compensation operation for the moving image is performed. The motion estimation operation is performed by dividing the present frame of an input image into many small reference blocks and comparing each reference block with various search blocks contained in a previous frame. Then, the difference between the search blocks of the previous frame and each of the reference blocks of the present frame is calculated. In other words, the "difference degree" of the search blocks for each of the reference blocks is determined. The search block having the smallest difference degree for a particular reference block is deemed to be the matching block for the particular reference block. After all of the matching blocks have been determined for the reference blocks, the difference between the coordinates of each reference block and its corresponding matching block is determined, and a motion vector corresponding to such difference is estimated. Then, the present frame is encoded based on the difference between the values of the pixels of each matching block and the values of the corresponding pixels in the reference block identified by the corresponding motion vector. The encoded frame is reconstructed to the original image by combining each encoded pixel value and the corresponding pixel value of the corresponding matching block.
A conventional method for performing a motion compensation operation will be described in conjunction with FIG. 1. As shown in the figure, the present frame 10 comprises a plurality of reference blocks, and the previous frame 12 comprises a plurality of matching blocks that respectively correspond to the reference blocks. The motion vector of each matching block of the previous frame 12 is estimated for each reference block of the present frame 10. Then, the image of the present frame 10 is encoded by using the matching blocks of the previous frame 12 that correspond to the respective estimated motion vectors.
In the method above, the matching blocks in the previous frame 12 often overlap each other since the motion vectors of the matching blocks are calculated based on the reference blocks in the present frame 10 and the matching blocks in the previous frame 12 that have similar pixel values to pixel values of the reference blocks. Thus, the matching blocks of the previous frame 12 move to form the present frame 10. As a result, the picture quality of the image of a new frame is deteriorated since the portions of the image at the border of many of the matching blocks overlap and are cut.